package com.ymttest.common.enums;

/**
 * 订单类型
 */
public enum OrderTypeEnum {
	/**
	 * 未知(-1)
	 */
	Unknown(-1),
	/**
	 * 现货订单(0)
	 */
	Spot(0),
	/**
	 * 扫货订单(1)
	 */
	Shangou(1),
	/**
	 * 下单器订单(2)
	 */
	Purchasing(2);

	private int intValue;
	private static java.util.HashMap<Integer, OrderTypeEnum> mappings;

	private synchronized static java.util.HashMap<Integer, OrderTypeEnum> getMappings() {
		if (mappings == null) {
			mappings = new java.util.HashMap<Integer, OrderTypeEnum>();
		}
		return mappings;
	}

	private OrderTypeEnum(int value) {
		intValue = value;
		OrderTypeEnum.getMappings().put(value, this);
	}

	public int getValue() {
		return intValue;
	}

	public static OrderTypeEnum forValue(int value) {
		return getMappings().get(value);
	}
}